#ifndef GYRO_FLOW_PORT_HORIZON_H
#define GYRO_FLOW_PORT_HORIZON_H

#include "imu_smooth.h"
typedef struct HorizonLock {
    bool lock_enabled;
    double horizonlockpercent;
    double horizonroll;
} HorizonLock;


/**
 * Define a function to create a default HorizonLock
 * @return
 */
HorizonLock horizonlock_default();

/**
 *
 * @param lock
 * @param lock_percent
 * @param roll
 */
void set_horizon(HorizonLock *lock, double lock_percent, double roll);

/**
 *
 * @param lock
 * @return
 */
int get_checksum(const HorizonLock *lock);

/**
 *
 * @param q     unit quaternion
 * @param roll_correction
 * @return
 */
//Quaternion lock_horizon_angle(const Quaternion *q, double roll_correction);

/**
 *
 * @param gvec
 * @param timestamp
 * @return
 */
//Vector3 interpolate_gravity_vector(TimeVec* gvec, int64_t timestamp);


#endif //GYRO_FLOW_PORT_HORIZON_H
